package com.it.park.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.it.park.client.service.NewsService;
import com.it.park.dao.NewsMapper;
import com.it.park.model.News;

@Service("newsService")
public class NewsServiceImpl extends BaseServiceImpl<News> implements NewsService {
	
	@Autowired
	private NewsMapper newsMapper;

	@Override
	public boolean insert(News record) {
		return newsMapper.insert(record) == 1;
	}
	@Override
	public boolean deleteByPrimaryKey(Integer id) {
		return newsMapper.deleteByPrimaryKey(id)==1;
	}
	@Override
	public boolean insertSelective(News record) {
		return newsMapper.insertSelective(record)==1;
	}
	@Override
	public News selectByPrimaryKey(Integer id) {
		return newsMapper.selectByPrimaryKey(id);
	}
	@Override
	public boolean updateByPrimaryKeySelective(News record) {
		return newsMapper.updateByPrimaryKeySelective(record)==1;
	}
	@Override
	public boolean updateByPrimaryKey(News record) {
		return false;
	}
	@Override
	public List<News> selectAll() {
		return newsMapper.selectAll();
	}
	@Override
	public List<News> selectPagination(Map<String, Object> map) {
		return newsMapper.selectPagination(map);
	}
	@Override
	public Integer selectTotal(Map<String, Object> map) {
		return newsMapper.selectTotal(map);
	}
	@Override
	public boolean updateByPrimaryKeyWithBLOBs(News record) {
		// TODO Auto-generated method stub
		return false;
	}
	@Override
	public List<News> selectByNewsTitle(String newsTitle) {
		return newsMapper.selectByNewsTitle(newsTitle);
	}
	@Override
	public List<News> selectPagination(News t) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public Integer selectTotal(News t) {
		// TODO Auto-generated method stub
		return null;
	}
	

}
